//代理模式
#include <iostream>
#include <memory>
using namespace std;


class RentHouse
{
public:
    virtual void rentHouse() = 0;
};


class LandLord : public RentHouse
{
public:
    void rentHouse() override
    {
        cout << "把房子租出去" << endl;
    }
};

class Intermediary : public RentHouse
{
public:
    void rentHouse()
    {
        cout << "发布出租启示" << endl;
        cout << "带人看房" << endl;
        _landlord.rentHouse();
        cout << "负责租后维修" << endl;
    }
private:
    LandLord _landlord;
};

int main()
{
    // 中介能够加强租房的功能
    Intermediary in;
    in.rentHouse();
    return 0;
} 